package com.lzy.wzy.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lzy.wzy.constant.MyConstant;
import com.lzy.wzy.utils.PublicUtils;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class FirstLevelTemplateInformationBean {

    private int templateId;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime productionDate;

    private String templateName;

    private String templateStatus;

    private int idf;

    private String author;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate createDate;

    public String getTemplateStatus() {
        return PublicUtils.getResult(templateStatus, idf);
    }
}
